#ifndef USBBASE_H
#define USBBASE_H

#include "define/data_define.h"
#include <thread>
#include "boost/signals2.hpp"
#include <QDebug>

struct userDevice{
    uint16_t idVendor;

    uint16_t idProduct;
    /// 写入节点的地址
    UC outEndPoint;
    /// 查询频率
    UC ms_Request;

    bool isOpen;
};

static userDevice user_device;

class USBBase
{
public:
    USBBase();



    bool GetOpened()
    {
        return true;
    }

    boost::signals2::signal<void(std::string)> _sigUpdate;

    virtual  bool ReadBuff();
    virtual  int OpenPort(int ,int );
    virtual  int CloseDevice();
    virtual int Send(const char*);
};

#endif // USBBASE_H
